import java.util.Scanner;
public class SeqSearch {
	public static void main(String[] args){
		Scanner scanner = new Scanner(System.in);
		String[] names = {"狮王","狗王","仁王","寄望"};
		System.out.println("请输入名字：");
		String findName = scanner.next();
		int index = -1;
		for(int i = 0; i < names.length; i++){
			if(findName.equals(names[i])){
				index = i;
				break;
			}
		}
		if(index != -1){
			System.out.println("找到了" + names[index] + "下标为" + index);
		}else{
			System.out.println("没有找到" + findName);
		}
	}
}